package com.zhangmeng.tools.controller;

import cn.hutool.core.io.FileUtil;
import javafx.fxml.FXML;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;

import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;

/**
 * @author : 芊芊墨客
 * @version : 1.0
 * @date : 2023-05-31 14:14
 *
 * 根据JSON 生成go 结构体
 *
 */
public class JsonToGoStructController {

    @FXML
    public WebView webView;

    @FXML
    public void initialize() {
        WebEngine engine = webView.getEngine();
        URI url = null;
        try {
            url = this.getClass().getClassLoader().getResource("templates/json_to_go_struct.html").toURI();
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        engine.load(url.toASCIIString());
    }

}

